from pathlib import Path
from core.detector import BaseOSDetector

class NixOSDetector(BaseOSDetector):
    def detect(self) -> bool:
        return Path("/etc/nixos/configuration.nix").exists()
    
    def get_channel(self) -> str:
        return subprocess.getoutput("nix-channel --list").split()[1]